x11: Store drag start coordinates
authorMatthias Clasen <mclasen@redhat.com>
Mon, 7 Dec 2015 20:07:54 +0000 (15:07 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Dec 2015 15:39:43 +0000 (10:39 -0500)
These will be used in later commits.

gdk/x11/gdkdnd-x11.c

index 02d7e332362fb68db3cce08cea13d5aa714aa124..79244769a4c61f6aceda1aee3122196cef94576a 100644 (file)
@@ -76,6 +76,8 @@ struct _GdkX11DragContext
 
   guint   ref_count;
 
+  gint start_x;                /* Where the drag started */
+  gint start_y;
   guint16 last_x;              /* Coordinates from last event */
   guint16 last_y;
   GdkDragAction old_action;    /* The last action we sent to the source */
@@ -1967,6 +1969,9 @@ _gdk_x11_window_drag_begin (GdkWindow *window,
 
   gdk_drag_context_set_device (context, device);
 
+  GDK_X11_DRAG_CONTEXT (context)->start_x = x_root;
+  GDK_X11_DRAG_CONTEXT (context)->start_y = y_root;
+
   GDK_X11_DRAG_CONTEXT (context)->drag_window = create_drag_window (gdk_window_get_screen (window));
 
   return context;